/*
 * map_handler.h
 */

#ifndef MAP_HANDLER_H_
#define MAP_HANDLER_H_

#include "map_file.h"

#define TILESIZE 32

/*
 * Open the map with the given name.
 */
int open_map( const char *filename );

/*
 * Returns the width of the current map.
 */
unsigned int map_get_width();

/*
 * Returns the height of the current map.
 */
unsigned int map_get_height();

/*
 * Returns true iff the given x/y coordinate lies inside the current map.
 */
int map_in_range( unsigned int x, unsigned int y );

/*
 * Returns the tile located at the given x/y location.
 */
struct map_tile get_tile( unsigned int x, unsigned int y );

#endif
